home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PROGEDIT / 2455.ZIP / PEDIT.DOC < prev    next >
Text File  |  1991-07-01  |  101KB  |  3,271 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                                     p E D I T
  13.                                -------------------
  14.                                the personal EDITor
  15.  
  16.  
  17.                                   Version 2.10
  18.  
  19.                                   July 1, 1991
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.                         pEDIT COPYRIGHT 1989, 1990, 1991
  31.  
  32.  
  33.  
  34.                                _______
  35.                           ____|__     |               (tm)
  36.                        --|       |    |-------------------
  37.                          |   ____|__  |  Association of
  38.                          |  |       |_|  Shareware
  39.                          |__|   o   |    Professionals
  40.                        -----|   |   |---------------------
  41.                             |___|___|    MEMBER
  42.  
  43.  
  44.  
  45.  
  46.  
  47.                                    T. G. Muench
  48.                                   P.O. Box 11536
  49.                              Prescott, AZ 86304-1536
  50.  
  51.  
  52.  
  53.  
  54.                         T A B L E   O F   C O N T E N T S
  55.  
  56.  
  57.  
  58.          Introduction . . . . . . . . . . . . . . . . . . . . .  1
  59.  
  60.          Installing pEDIT
  61.  
  62.              1. General Information . . . . . . . . . . . . . .  3
  63.              2. Floppy Disk Installation  . . . . . . . . . . .  5
  64.              3. Hard Disk Installation  . . . . . . . . . . . .  6
  65.  
  66.          Quick Starting pEDIT . . . . . . . . . . . . . . . . .  8
  67.  
  68.          Interacting With pEDIT
  69.  
  70.              1. Command Mode  . . . . . . . . . . . . . . . . . 12
  71.              2. Prompting Mode  . . . . . . . . . . . . . . . . 12
  72.  
  73.          pEDIT Commands
  74.  
  75.              1. Cursor Movement . . . . . . . . . . . . . . . . 13
  76.              2. Text Manipulation . . . . . . . . . . . . . . . 15
  77.              3. Text Deletion . . . . . . . . . . . . . . . . . 18
  78.              4. Searching . . . . . . . . . . . . . . . . . . . 19
  79.              5. Files . . . . . . . . . . . . . . . . . . . . . 21
  80.              6. Buffers . . . . . . . . . . . . . . . . . . . . 23
  81.              7. Windows . . . . . . . . . . . . . . . . . . . . 25
  82.              8. Key Macros  . . . . . . . . . . . . . . . . . . 27
  83.              9. Cut and Paste . . . . . . . . . . . . . . . . . 29
  84.             10. Miscellaneous . . . . . . . . . . . . . . . . . 30
  85.  
  86.          Macro Facility
  87.  
  88.              1. Macro Types . . . . . . . . . . . . . . . . . . 35
  89.              2. Macro Execution . . . . . . . . . . . . . . . . 35
  90.              3. Sample Macros . . . . . . . . . . . . . . . . . 35
  91.  
  92.          Extended DOS Shell . . . . . . . . . . . . . . . . . . 37
  93.  
  94.          Compiling From pEDIT
  95.  
  96.              1. Manual Invocation . . . . . . . . . . . . . . . 38
  97.              2. Batch File  . . . . . . . . . . . . . . . . . . 38
  98.              3. Disk Macros . . . . . . . . . . . . . . . . . . 39
  99.  
  100.  
  101.  
  102.  
  103.                         T A B L E   O F   C O N T E N T S
  104.  
  105.  
  106.  
  107.          Error Handling
  108.  
  109.              1. Insufficient Internal Storage . . . . . . . . . 40
  110.              2. Insufficient Disk Space . . . . . . . . . . . . 40
  111.              3. No Initialization File  . . . . . . . . . . . . 40
  112.  
  113.          Miscellaneous/Legalities
  114.  
  115.              1. Copyright Notice  . . . . . . . . . . . . . . . 41
  116.              2. Disclaimer and Warranty . . . . . . . . . . . . 41
  117.              3. Registration  . . . . . . . . . . . . . . . . . 41
  118.              4. Association of Shareware Professionals  . . . . 42
  119.              5. The Author  . . . . . . . . . . . . . . . . . . 42
  120.  
  121.          Add-On Products  . . . . . . . . . . . . . . . . . . . 44
  122.  
  123.          Appendices
  124.  
  125.              A. Key Bindings
  126.                 1. Labelled Keys  . . . . . . . . . . . . . . . 45
  127.                 2. WordStar . . . . . . . . . . . . . . . . . . 46
  128.                 3. Emacs  . . . . . . . . . . . . . . . . . . . 48
  129.                 4. Standard and Alternate . . . . . . . . . . . 50
  130.              B. The DOS Environment . . . . . . . . . . . . . . 52
  131.              C. Initialization File . . . . . . . . . . . . . . 53
  132.              D. Help File . . . . . . . . . . . . . . . . . . . 54
  133.              E. Keyboard Help File  . . . . . . . . . . . . . . 54
  134.              F. Color Codes . . . . . . . . . . . . . . . . . . 55
  135.  
  136.  
  137.  
  138.  
  139.                              I N T R O D U C T I O N
  140.  
  141.  
  142.             pEDIT is a text editor for the IBM Personal Computer
  143.         family. It has been tested on XT, AT, 80386 and PS/2 models
  144.         with MDA, CGA, EGA and VGA monitors. pEDIT requires Version
  145.         2.1 or higher of PC-DOS/MS-DOS and a minimum of 320k of
  146.         memory; 512k is recommended as is a hard disk.
  147.  
  148.             pEDIT is not a word processor or desktop publisher and
  149.         does not have features like graphics, multiple fonts or the
  150.         like. While the purpose of pEDIT is to create and edit text,
  151.         it does have several features normally associated with word
  152.         processors: settable margins, automatic word wrap, paragraph
  153.         indent and line centering. Words (or parts of words) can be
  154.         Capitalized, lower-cased or UPPER-CASED. Paragraphs can be
  155.         'filled' or reformatted to fit within the existing margins.
  156.  
  157.             The editor configures itself by loading an 'initiali-
  158.         zation' file at start up. This file contains environment
  159.         settings and key bindings that are used to customize the
  160.         editor. You can make pEDIT work the way you want it to
  161.         work... even mimic another editor such as WordStar or Emacs.
  162.         pEDIT is completely configurable; if you don't like the
  163.         supplied configurations, modify them or create your own.
  164.  
  165.             pEDIT is unique among shareware editors in that every-
  166.         thing is treated as text in a buffer. This includes all
  167.         editor commands and the output from shelled DOS commands.
  168.         Any command can be recalled, edited and reissued. However,
  169.         most common commands are bound to keys because no one -
  170.         including the author - wants to type in lengthy commands.
  171.  
  172.             Every effort has been made to make the editor perform as
  173.         efficiently as possible. The speed is quite good on an AT (or
  174.         higher) class machine with a hard drive. All text is stored
  175.         entirely in memory, which makes accessing any part of the
  176.         file very fast. The user can move from the top to the bottom
  177.         of any buffer instantaneously.
  178.  
  179.             Release 2.0 of pEDIT added many new features which made
  180.         it competitive with any shareware editor available:
  181.  
  182.             * file pick lists
  183.             * disk macros
  184.             * on-line help
  185.             * wild card search
  186.  
  187.  
  188.  
  189.  
  190.  
  191.                                       - 1 -
  192.  
  193.  
  194.  
  195.  
  196.             Now, Version 2.10 adds:
  197.  
  198.             * multi-keystroke commands
  199.             * WordStar and Emacs configurations
  200.             * global find and replace (all buffers)
  201.             * automatic paragraph indent
  202.             * wildcards now work with replace
  203.             * 80-column ruler
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.                                       - 2 -
  249.  
  250.  
  251.  
  252.  
  253.                          I N S T A L L I N G   p E D I T
  254.  
  255.  
  256.                              1. General Information
  257.  
  258.             The distribution diskette contains the following files.
  259.         An asterisk indicates the file is included with the regis-
  260.         tered version only.
  261.  
  262.             READ.ME
  263.  
  264.                 Text file containing information about the INSTALL
  265.                 program and how to get started with pEDIT
  266.  
  267.             WHATS.NEW
  268.  
  269.                 New features of pEDIT 2.0 and 2.10
  270.  
  271.             PEDIT.DOC
  272.  
  273.                 This document; it is a standard Ascii text file that
  274.                 can be typed or printed
  275.  
  276.             PEDIT.EXE
  277.  
  278.                 The pEDIT executable program
  279.  
  280.             PEDIT.HLP
  281.  
  282.                 Help file containing a customizable description of
  283.                 every pEDIT command
  284.  
  285.             PEDWST.INI
  286.             PEDEMC.INI
  287.             PEDSTD.INI
  288.             PEDALT.INI
  289.  
  290.                 Sample initialization (init) files for WordStar,
  291.                 Emacs, Standard and Alternate configurations
  292.  
  293.             PEDWST.KEY
  294.             PEDEMC.KEY
  295.             PEDSTD.KEY
  296.             PEDALT.KEY
  297.  
  298.                 Keyboard help files for the 101 (Enhanced) keyboard
  299.                 to match the above initialization files
  300.  
  301.             WSTLETTR.PMC
  302.             WSTOTHUP.PMC
  303.  
  304.  
  305.                                       - 3 -
  306.  
  307.  
  308.  
  309.  
  310.             WSTOTHDN.PMC
  311.             WSTWREV.PMC
  312.  
  313.                 Sample WordStar disk macros; see the section titled
  314.                 'Macro Facility' for more information
  315.  
  316.             EMCLETTR.PMC
  317.             EMCOTHUP.PMC
  318.             EMCOTHDN.PMC
  319.             EMCWREV.PMC
  320.  
  321.                 Sample Emacs disk macros
  322.  
  323.             STDLETTR.PMC
  324.             STDOTHUP.PMC
  325.             STDOTHDN.PMC
  326.             STDWREV.PMC
  327.  
  328.                 Sample Standard disk macros
  329.  
  330.             ALTLETTR.PMC
  331.             ALTOTHUP.PMC
  332.             ALTOTHDN.PMC
  333.             ALTWREV.PMC
  334.  
  335.                 Sample Alternate disk macros
  336.  
  337.             REGISTER.DOC
  338.  
  339.                 How to register for pEDIT; registered owners receive
  340.                 the latest version of pEDIT without the shareware
  341.                 screens, a printed manual, telephone support, FREE
  342.                 utilities and one FREE upgrade
  343.  
  344.             VENDOR.DOC
  345.  
  346.                 Information for shareware vendors regarding require-
  347.                 ments for distributing pEDIT
  348.  
  349.             INSTALL.EXE
  350.  
  351.                 Program to install pEDIT on floppy and hard disk
  352.                 based systems
  353.  
  354.          (*)KEYRATE.COM
  355.  
  356.                 Program to set the keyboard repeat rate on AT and
  357.                 later computers
  358.  
  359.          (*)STAYDOWN.COM
  360.  
  361.  
  362.                                       - 4 -
  363.  
  364.  
  365.  
  366.  
  367.                 Memory-resident utility from PC Magazine to allow
  368.                 Ctrl-, Alt- and Shift- commands to be entered as 2
  369.                 keystrokes.
  370.  
  371.             The distribution diskette is a MASTER and should be used
  372.         only for making copies. It should be write-protected and
  373.         NEVER used for editing.
  374.  
  375.             The installation program INSTALL displays a screen of
  376.         information that details how to use the program. Help is
  377.         available at any prompt by entering a question mark. The
  378.         procedure can be aborted at any prompt by typing Ctrl-C.
  379.  
  380.             The following installation procedures assume you have a
  381.         basic knowledge of PC operation and can format a diskette.
  382.         Refer to your DOS manual as needed.
  383.  
  384.             There are some things to check and decisions to make
  385.         BEFORE starting the installation:
  386.  
  387.         1. If you are installing pEDIT for the first time, make sure
  388.            the target device has at least 275k of free disk space
  389.  
  390.         2. Choose one of the supplied configurations (WordStar,
  391.            Emacs, Standard or Alternate); see the Appendix for a
  392.            description of each
  393.  
  394.         3. Decide if you want to install the optional KEYRATE and
  395.            STAYDOWN utilities (Registered version only)
  396.  
  397.         4. Decide if you want to setup a DOS environment variable -
  398.            highly recommended for hard disk systems; refer to the
  399.            Appendix for additional information
  400.  
  401.         5. If you are upgrading pEDIT, decide if you want to keep any
  402.            existing INI or KEY files; if so, rename them so they can
  403.            be restored after the installation.
  404.  
  405.  
  406.                            2. Floppy Disk Installation
  407.  
  408.             This procedure assumes you have 2 floppy disks of at
  409.         least 360kb each. pEDIT will not be very usable with a single
  410.         360kb floppy - there will not be much room for text files.
  411.  
  412.             In a floppy-based system, Drive A: will hold the program
  413.         disk with the pEDIT executable, initialization, help and key-
  414.         board help files. Drive B: will contain a work disk with your
  415.         documents, source programs or other text.
  416.  
  417.  
  418.  
  419.                                       - 5 -
  420.  
  421.  
  422.  
  423.  
  424.         1. Format two diskettes; make one (the program disk) a system
  425.            disk if you want to be able to boot from it; label the
  426.            floppies 'pEDIT Program' and 'pEDIT Work'
  427.  
  428.         2. Insert the distribution diskette in Drive A:
  429.  
  430.         3. Set default to the A: drive and run the INSTALL program
  431.  
  432.               A>INSTALL<Enter>
  433.  
  434.         4. Remove the distribution disk from Drive A; move the pEDIT
  435.            Program Disk to Drive A and insert a pEDIT Work Disk in B:
  436.  
  437.         5. If you want KEYRATE to be run automatically when you boot,
  438.            copy KEYRATE.COM to your system disk and add the following
  439.            line to your AUTOEXEC.BAT file:
  440.  
  441.               KEYRATE FAST
  442.  
  443.         6. If you want STAYDOWN to be installed when you boot, copy
  444.            STAYDOWN.COM to the system (boot) diskette and add this
  445.            line to AUTOEXEC.BAT:
  446.  
  447.               STAYDOWN
  448.  
  449.         7. If you modified AUTOEXEC, reboot your computer
  450.  
  451.         8. Proceed to "Quick Starting pEDIT"
  452.  
  453.  
  454.                              3. Hard Disk Installation
  455.  
  456.             This procedure assumes you have one floppy drive and a
  457.         hard disk of any size. You will most certainly want to in-
  458.         stall pEDIT on the hard drive for improved speed.
  459.  
  460.             You will need to decide if you want to install pEDIT in
  461.         the root (\) directory, in its own directory (\PEDIT), or in,
  462.         for example, a \TOOLS or \UTIL directory. The example assumes
  463.         pEDIT will be installed from Drive A into its own directory
  464.         on Drive C.
  465.  
  466.         1. Insert the distribution diskette in Drive A:
  467.  
  468.         2. Set default to the A: drive and run the installation program
  469.  
  470.             A>INSTALL<Enter>
  471.  
  472.         3. Remove the distribution disk from Drive A:
  473.  
  474.  
  475.  
  476.                                       - 6 -
  477.  
  478.  
  479.  
  480.  
  481.         4. If you want KEYRATE to be invoked automatically when you
  482.            boot, copy KEYRATE.COM to the root directory of your hard
  483.            disk and add the following line to AUTOEXEC.BAT:
  484.  
  485.               C:\KEYRATE FAST
  486.  
  487.         5. If you want STAYDOWN to be installed when you boot, copy
  488.            STAYDOWN.COM to the root directory and add this line to
  489.            AUTOEXEC.BAT:
  490.  
  491.               C:\STAYDOWN
  492.  
  493.         6. Add the directory containing the pEDIT executable to your
  494.            DOS PATH. It is also strongly recommended that you define
  495.            a DOS environment variable so the editor can find the
  496.            files it needs; add the following line to AUTOEXEC.BAT,
  497.            again substituting your directory if other than \PEDIT:
  498.  
  499.               SET PEDIT=C:\PEDIT
  500.  
  501.         7. If you modified AUTOEXEC, reboot your computer
  502.  
  503.         8. Proceed to "Quick Starting pEDIT"
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.                                       - 7 -
  534.  
  535.  
  536.  
  537.  
  538.                       Q U I C K  S T A R T I N G  p E D I T
  539.  
  540.  
  541.             The program file (PEDIT.EXE) must be accessible through
  542.         your DOS PATH, or be in the current default directory. The
  543.         help, keyboard and initialization files (PEDIT.HLP, PEDIT.KEY
  544.         and PEDIT.INI) must be accessible via the DOS environment or,
  545.         again, be present in the current directory.
  546.  
  547.             It is almost mandatory that hard drive users define a DOS
  548.         environment variable 'PEDIT' so the editor can find the files
  549.         it needs. The Appendix contains detailed information on how
  550.         to do this.
  551.  
  552.             If you have a floppy-only system, make sure you have a
  553.         copy of COMMAND.COM present. pEDIT must be able to find this
  554.         file to use the (X)Dos and (X)Spawn commands.
  555.  
  556.             pEDIT can be started in one of two ways - with or without
  557.         a file specification. If you don't want to start out editing
  558.         an existing file, enter:
  559.  
  560.               C>PEDIT
  561.  
  562.             The normal way of starting pEDIT would be to specify the
  563.         name of a file to be edited using either a specific or wildcard
  564.         file specification:
  565.  
  566.               C>PEDIT D:\PATH\FILENAME.TYP
  567.  
  568.               C>PEDIT D:\PATH\*.DOC
  569.  
  570.             If you use a wildcard specification, you will be pre-
  571.         sented with a FILES window containing a 'pick list' of all
  572.         matching filenames (unless there are "No matching files" or
  573.         "Too many files"). If you see the latter error and have
  574.         specified e.g. '*.*', narrow the search.
  575.  
  576.             Once a file has been selected, the screen will clear and
  577.         you will see pEDIT's inverse status line. Next the message
  578.         line will show that the initialization file is being read -
  579.         provided, of course, that pEDIT can find one. Finally, if a
  580.         matching file was found, it will be loaded in and pEDIT will
  581.         display the first screenfull of text. The cursor will be
  582.         positioned at the top of the buffer.
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.                                       - 8 -
  591.  
  592.  
  593.  
  594.  
  595.             +--------------------------------------------------------+
  596.           1 |                                                        |
  597.           2 |                                                        |
  598.           3 |                                                        |
  599.           4 |                                                        |
  600.           5 |                                                        |
  601.           6 |                                                        |
  602.           7 |                                                        |
  603.           8 |                                                        |
  604.           9 |                                                        |
  605.          10 |                                                        |
  606.             +--------------------------------------------------------+
  607.          11 |   BufferName         Global    Mode      Direction     |
  608.             +--------------------------------------------------------+
  609.          12 |                                                        |
  610.          13 |                                                        |
  611.          14 |                                                        |
  612.          15 |                                                        |
  613.          16 |                                                        |
  614.          17 |                                                        |
  615.          18 |                                                        |
  616.          19 |                                                        |
  617.          20 |                                                        |
  618.          21 |                                                        |
  619.             +--------------------------------------------------------+
  620.          22 |   BufferName         Global    Mode      Direction     |
  621.             +--------------------------------------------------------+
  622.          23  Command:
  623.          24  <Message>                                   Working . . .
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.                                     Figure 1
  635.                                   ------------
  636.                                   pEDIT Screen
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.                                       - 9 -
  648.  
  649.  
  650.  
  651.  
  652.             pEDIT uses screen rows 1-24 for text, status, commands
  653.         and messages. The 25th line is not used. The pEDIT screen can
  654.         contain 1 or 2 windows. A single window holds 21 lines of
  655.         text; if the screen is split, each window contains 10 lines.
  656.  
  657.             Figure 1 shows a representation of the pEDIT screen with
  658.         two windows displayed. It is important to realize that you
  659.         can view two different files or two portions of the same file
  660.         when the screen is split.
  661.  
  662.             Each window has a reverse video status line at the
  663.         bottom. What the status line shows depends on what the window
  664.         is used for. If it is a text window, the status line shows
  665.         the buffer name, the current scope (blank=Local/Global), mode
  666.         (Insert/Overstrike) and direction (Forward/Reverse). For an
  667.         informational window, it indicates the type of information
  668.         being displayed - HELP, FILES, SHOW, LIST, ERROR, etc.
  669.  
  670.             A window can be thought of as a viewport into a portion
  671.         of the text. Figure 2 shows a text buffer (represented by the
  672.         large box) and a window into the text. A window can never
  673.         show more than 80 columns of text. pEDIT uses horizontal
  674.         scrolling so the window can be into any portion of the text,
  675.         not just the leftmost 80 columns. pEDIT can handle lines up
  676.         to 32767 characters in length.
  677.  
  678.             The command line displayed at row 23 is actually a one
  679.         line window into the COMMAND buffer. The 'Command: ' prompt
  680.         is displayed whenever the editor is in command mode.
  681.  
  682.             The message line at row 24 is used to display inform-
  683.         ational text, errors, etc. Also shown at the right margin is
  684.         the 'Working . . .' message that flashes whenever pEDIT is
  685.         busy loading a file, searching, etc. The message is erased
  686.         whenever a key is pressed.
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.                                       - 10 -
  705.  
  706.  
  707.  
  708.  
  709.             +--------------------------------------------------------+
  710.             |                                                        |
  711.             |        +----------------+                              |
  712.             | Now is |the time for all| good persons to come to the  |
  713.             | aid of |their country.  |                              |
  714.             |        |                |                              |
  715.             |        |<--- Window --->|                              |
  716.             |        |                |                              |
  717.             |        +----------------+                              |
  718.             |                                                        |
  719.             |                                                        |
  720.             |                                                        |
  721.             |                                                        |
  722.             |                                                        |
  723.             |                                                        |
  724.             |                                                        |
  725.             |<----------------------- Buffer ----------------------->|
  726.             |                                                        |
  727.             |                                                        |
  728.             |                                                        |
  729.             |                                                        |
  730.             |                                                        |
  731.             |                                                        |
  732.             |                                                        |
  733.             |                                                        |
  734.             |                                                        |
  735.             |                                                        |
  736.             |                                                        |
  737.             +--------------------------------------------------------+
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.                                     Figure 2
  747.                                  ---------------
  748.                                  Buffers/Windows
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.                                       - 11 -
  762.  
  763.  
  764.  
  765.  
  766.                          I N T E R A C T I N G   W I T H
  767.                                     p E D I T
  768.  
  769.  
  770.             There are two ways to interact with the editor - command
  771.         mode and prompting mode. In either mode, pEDIT will ask for
  772.         missing parameters if an incomplete command is given. For
  773.         example, if you enter "Replace", you will be asked for "Old
  774.         string" and "New string".
  775.  
  776.  
  777.                                  1. Command Mode
  778.  
  779.             Command mode is entered by pressing the DoCommand key -
  780.         normally the <Esc> key. The prompt "Command: " is displayed
  781.         on the command line and the cursor will be positioned after
  782.         the colon. At this point you can issue any valid pEDIT
  783.         command, for example "WRITE FILE" or "SET MARGINS 10 70".
  784.  
  785.             It is very important to realize that the command line is
  786.         a window into the COMMAND buffer. All defined keys and pEDIT
  787.         commands will work as expected - you can move backwards and
  788.         forwards, toggle between insert and overstrike mode, etc. The
  789.         command prompt is part of the text and can be over-written or
  790.         deleted; be careful to leave the "Command: " portion of each
  791.         line intact.
  792.  
  793.             Note that the command window does not have an associated
  794.         status line so you will not be able to see the current mode
  795.         and direction. However, these parameters can be set for this
  796.         buffer as for any other buffer.
  797.  
  798.  
  799.                                 2. Prompting Mode
  800.  
  801.             Prompting mode is active whenever pEDIT is asking for
  802.         input and the "Command: " prompt is not displayed. In this
  803.         mode you will not have access to all of pEDIT's commands and
  804.         key definitions. Only Insert mode is supported; limited line
  805.         editing is available using a subset of your defined keys:
  806.  
  807.             Move Up        Recall the last command entered
  808.             Erase Prev     Erase the previous character
  809.             Erase Char     Erase current character
  810.             Move Left      Move cursor left one character
  811.             Move Right     Move right one character
  812.             Move Home      Position to start of line
  813.             Move End       Position cursor to end of line
  814.  
  815.  
  816.  
  817.  
  818.                                       - 12 -
  819.  
  820.  
  821.  
  822.  
  823.                            p E D I T   C O M M A N D S
  824.  
  825.                                1. Cursor Movement
  826.  
  827.         Moving the cursor around in the text is among the most basic
  828.         of all editing functions. The following commands let you do
  829.         just that.
  830.  
  831.         1.1. Move Top
  832.  
  833.         This command positions the cursor to the first line of the
  834.         buffer, scrolling or repainting the screen as necessary.
  835.         pEDIT keeps all text in memory, making it very fast to move
  836.         to the top of the buffer from any point in the buffer.
  837.  
  838.         1.2. Move Bottom
  839.  
  840.         This function moves the cursor to the dummy last line at the
  841.         end of the buffer. The screen will scroll or repaint as re-
  842.         quired.
  843.  
  844.         1.3. Move Home
  845.  
  846.         The action of MoveHome depends on the position of the cursor
  847.         within the current line. If the cursor is not at the begin-
  848.         ning of the line, it will move there. If it is at the start
  849.         of a line, it will move to the start of the previous line.
  850.         This command is normally bound to the <Home> key.
  851.  
  852.         1.4. Move End
  853.  
  854.         The action of MoveEnd depends on the position of the cursor
  855.         within the current line. If the cursor is not at the end of
  856.         the line, it will move there. If it is at the end of a line,
  857.         it will move to the end of the next line. This command is
  858.         normally bound to the <End> key.
  859.  
  860.         1.5. Move Up
  861.  
  862.         Moves the cursor up one line in the current buffer. There is
  863.         no action if the cursor is already on the first line of the
  864.         buffer. Note that pEDIT attempts to keep the cursor as close
  865.         to the same column as possible. The command is normally bound
  866.         to the <Up> key.
  867.  
  868.         1.6. Move Down
  869.  
  870.         MoveDown moves the cursor down one line in the current
  871.         buffer. The cursor cannot move if it is already on the dummy
  872.  
  873.  
  874.  
  875.                                       - 13 -
  876.  
  877.  
  878.  
  879.  
  880.         last line of the buffer. pEDIT will keep the cursor as close
  881.         as possible to the same column. This command is normally
  882.         bound to the <Down> key.
  883.  
  884.         1.7. Move Left
  885.  
  886.         Moves the cursor left one character position. If the cursor
  887.         is at the beginning of a line, it will wrap to the end of the
  888.         previous line. This command is normally bound to the <Left>
  889.         key.
  890.  
  891.         1.8. Move Right
  892.  
  893.         Moves the cursor right one character position. If the cursor
  894.         is at the end of a line, it will wrap to the beginning of the
  895.         next line. This command is normally bound to the <Right> key.
  896.  
  897.         1.9. Move Word
  898.  
  899.         MoveWord will move the cursor to the beginning of the next
  900.         word in the current direction. If the direction is Forward,
  901.         it will move toward the end of the buffer; if the direction
  902.         is Reverse, toward the beginning of the buffer.
  903.  
  904.         The screen will scroll or repaint depending on the state of
  905.         Select. If Select is active, the screen will be redisplayed.
  906.         If Select is not active, scrolling will take place to keep
  907.         the cursor on the fourth line from the top or bottom of the
  908.         window.
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.                                       - 14 -
  933.  
  934.  
  935.  
  936.  
  937.                            p E D I T   C O M M A N D S
  938.  
  939.                               2. Text Manipulation
  940.  
  941.         These commands are used to manipulate text - insert new text
  942.         and change the form of existing text.
  943.  
  944.         2.1. Insert Char
  945.  
  946.         This is the default when one of the typing keys is pressed.
  947.         In Insert mode, the character will be inserted into the
  948.         buffer at the current cursor position; text to the right is
  949.         "shoved over" to make room. In Overstrike mode, the character
  950.         is simply overwritten.
  951.  
  952.         pEDIT uses automatic word wrap to keep text between the
  953.         defined margins as you type. If a word will not fit inside
  954.         the current right margin, it will be moved to the start of
  955.         the next line. The first line of a paragraph will be auto-
  956.         matically indented if the PIndent parameter is set.
  957.  
  958.         When the Tab key is pressed, the cursor will move to the next
  959.         tab stop. pEDIT supports only tab stops at every eighth
  960.         column. Control characters display as a caret (^) followed by
  961.         the displayable character, i.e. Ctrl-A shows as ^A.
  962.  
  963.         2.2. Open Line
  964.  
  965.         This function opens up a new (empty) line for text insertion.
  966.         The end result is the same as pressing Enter followed by Move-
  967.         Left except that there will be no indenting.
  968.  
  969.         2.3. Fill Paragraph
  970.  
  971.         Reformats a paragraph or portion of a paragraph to fit within
  972.         the defined margins. Paragraph indenting, if any, is honored
  973.         for the first line. Use this command after you have inserted
  974.         or deleted text or changed margins.
  975.  
  976.         The SetMargins and SetPIndent commands are used to set the
  977.         margins and paragraph indent, respectively. Reformatting
  978.         begins at the current line and stops at the end of the para-
  979.         graph. A paragraph is defined as contiguous text bounded by
  980.         empty lines both above and below.
  981.  
  982.         2.4. Indent
  983.  
  984.         This function is very useful in programming when you want to
  985.         indent a section of code in or out without having to manually
  986.  
  987.  
  988.  
  989.                                       - 15 -
  990.  
  991.  
  992.  
  993.  
  994.         edit each line. Indenting is by levels where one level is 4
  995.         character positions or one-half a tab stop. Indent uses tabs
  996.         and spaces to indent the line to the desired offset.
  997.  
  998.         To use indent (1) position the cursor to the start of the
  999.         first line, (2) toggle Select on, (3) highlight the entire
  1000.         range of lines to be indented and (4) issue the "INDENT" or
  1001.         "INDENT n" command. Specify the number of levels (n) as a
  1002.         positive or negative integer - positive for 'out' (toward the
  1003.         right), negative for 'in'.
  1004.  
  1005.         2.5. Auto Indent
  1006.  
  1007.         This function is very useful in programming. It is used to
  1008.         automatically indent a new line the same as the previous
  1009.         line. pEDIT uses the same leading whitespace (spaces and
  1010.         tabs) as the previous line. AutoIndent is normally used at
  1011.         the end of a line but the command can be issued anywhere. The
  1012.         command is normally bound to <Ctrl-Enter>.
  1013.  
  1014.         2.6. Center Line
  1015.  
  1016.         This command centers the current line - the line the cursor
  1017.         is on - between the existing margins. Only spaces are used to
  1018.         indent the line to the appropriate position.
  1019.  
  1020.         2.7. Capital Word
  1021.  
  1022.         Capitalizes the current word starting at the current position
  1023.         of the cursor within the word. The case change does not start
  1024.         at the beginning of the word; this is to allow, for example,
  1025.         'Compuserve' to be changed to 'CompuServe'.
  1026.  
  1027.         2.8. Lower Word
  1028.  
  1029.         This command converts the current word to lower-case starting
  1030.         at the current position within the word. All characters from
  1031.         the cursor to the end of the word will be changed to lower-
  1032.         case.
  1033.  
  1034.         2.9. Upper Word
  1035.  
  1036.         UpperWord converts the current word to upper-case, again
  1037.         starting at the current character position and not at the
  1038.         beginning of the word.
  1039.  
  1040.         2.10. Quote Char
  1041.  
  1042.         This function is used to enter special characters into the
  1043.  
  1044.  
  1045.  
  1046.                                       - 16 -
  1047.  
  1048.  
  1049.  
  1050.  
  1051.         text. pEDIT prompts you with "Press key to be added: "; at
  1052.         this point press one of the special keys. For example, to
  1053.         insert a form feed (Ctrl-L, Ascii 12) press Ctrl-V followed
  1054.         by Ctrl-L. The character will show as '^L' on the screen.
  1055.  
  1056.         The feature can also be used with Find and Replace. To find a
  1057.         line feed (Ctrl-J, Ascii 10) for example, press the DoCommand
  1058.         key and enter "FIND ^V^J".
  1059.  
  1060.         Note that extended keys such as the PC keypad and function
  1061.         keys cannot be quoted. The PC graphics characters - those
  1062.         above Ascii 127 - are inserted in a special way. Hold down
  1063.         the Alt key and enter the decimal value of the character
  1064.         using the numeric keypad only; release the Alt key when done.
  1065.  
  1066.         2.11. Trans Char
  1067.  
  1068.         This command transposes (swaps) two characters of text within
  1069.         a line. The cursor must be on the second character when you
  1070.         issue the command. The cursor cannot be positioned past the
  1071.         end of the line.
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.                                       - 17 -
  1104.  
  1105.  
  1106.  
  1107.  
  1108.                            p E D I T   C O M M A N D S
  1109.  
  1110.                                 3. Text Deletion
  1111.  
  1112.         These commands are used to erase existing text and to restore
  1113.         deleted text. Deletion can be by character, word or line.
  1114.  
  1115.         3.1. Erase Char
  1116.  
  1117.         Deletes the current character - the character the cursor is
  1118.         on. The action is dependent on the current mode. In Insert
  1119.         mode, the character is deleted and text to the right of the
  1120.         cursor is shifted left to "fill in the hole". In Overstrike
  1121.         mode, the character is replaced by a space.
  1122.  
  1123.         3.2. Erase Prev (Backspace)
  1124.  
  1125.         Deletes the previous character - the character to the left of
  1126.         the cursor. In Insert mode, the character is deleted and text
  1127.         to the right of the cursor is again shifted toward the left.
  1128.         In Overstrike mode, the character is replaced by a space.
  1129.  
  1130.         ErasePrev is permanently bound to the Backspace key which
  1131.         cannot be redefined. BackSpace therefore functions the same
  1132.         as it does at the DOS (Operating System) level.
  1133.  
  1134.         3.3. Erase Word
  1135.  
  1136.         EraseWord deletes text from the current position in a word to
  1137.         the end of the word. The current direction (Forward/Reverse)
  1138.         does not affect the action; deletion is always toward the end
  1139.         of the word.
  1140.  
  1141.         The current mode also has no effect on EraseWord. The entire
  1142.         word (or portion of a word) will be erased.
  1143.  
  1144.         3.4. Erase Line
  1145.  
  1146.         Erases an entire line or a portion of a line. If the cursor
  1147.         is at the beginning of a line, the entire line - including
  1148.         the end of line marker - is erased and stored in the text
  1149.         buffer. If the cursor is not at the beginning of a line,
  1150.         deletion is from the current position to the end of the line.
  1151.  
  1152.         3.5. Restore Text
  1153.  
  1154.         This command restores the text last deleted by EraseWord or
  1155.         EraseLine. This text is stored in a special text buffer for
  1156.         later restoration. This text buffer is rebuilt after every
  1157.         action so only the last erasure can be restored.
  1158.  
  1159.  
  1160.                                       - 18 -
  1161.  
  1162.  
  1163.  
  1164.  
  1165.                            p E D I T   C O M M A N D S
  1166.  
  1167.                                   4. Searching
  1168.  
  1169.         These commands are used to search for text and to replace one
  1170.         text string by another. A limited wild card facility permits
  1171.         matching the beginning and end of line. The SetScope command
  1172.         determines if the searching is to be local (current buffer)
  1173.         or global (all buffers).
  1174.  
  1175.         4.1. Find
  1176.  
  1177.         Used to search for a text string. To initiate this function,
  1178.         press the Find key and respond to "String to find" or press
  1179.         DoCommand and enter "FIND <text>". The direction of the
  1180.         search will be in the current direction. An executing Find
  1181.         operation can be cancelled by pressing the Abort key.
  1182.  
  1183.         If the target string is all lowercase, the operation will be
  1184.         case-insensitive; that is 'pedit' will match 'pedit', 'pEDIT'
  1185.         and 'PEDIT'. If, however, the target contains any uppercase
  1186.         characters, the match will be exact, i.e. 'pEDIT' matches
  1187.         only 'pEDIT'.
  1188.  
  1189.         Special symbols are used to match beginning of line (bol) and
  1190.         end of line (eol). Use '\\<' for bol and '\\>' for eol. For
  1191.         example, '.\\>' matchs a period only if it is at the end of a
  1192.         line.
  1193.  
  1194.         4.2. Findnext
  1195.  
  1196.         This command will find the next occurrence of the last search
  1197.         string you specified. It is advisable to have Findnext bound
  1198.         to a key so only a single key press is required to repeat the
  1199.         last search operation.
  1200.  
  1201.         4.3. Replace
  1202.  
  1203.         pEDIT has a very powerful search and replace function. To
  1204.         initiate it, either press the Replace key and reply to the
  1205.         "Old string:" and "New string:" prompts, or press DoCommand
  1206.         and enter "REPLACE <old> <new>".
  1207.  
  1208.         pEDIT will search for each occurrence of 'old' and prompt you
  1209.         with "Replace (Y)es (N)o (A)ll (L)ast (Q)uit: "
  1210.  
  1211.             Y, Enter - replace this occurrence
  1212.             N        - skip this replacement
  1213.             A        - replace all occurrences from this point
  1214.  
  1215.  
  1216.  
  1217.                                       - 19 -
  1218.  
  1219.  
  1220.  
  1221.  
  1222.             L        - make this the last replacement and quit
  1223.             Q        - quit.
  1224.  
  1225.         Matching the old string will follow the rules listed for the
  1226.         Find command. The same wild cards as Find are permitted in
  1227.         the 'old' string only.
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.                                       - 20 -
  1275.  
  1276.  
  1277.  
  1278.  
  1279.                            p E D I T   C O M M A N D S
  1280.  
  1281.                                     5. Files
  1282.  
  1283.         These commands pertain to the reading and writing of disk
  1284.         files.
  1285.  
  1286.         5.1. Get File
  1287.  
  1288.         This command loads in a new file for editing. pEDIT supports
  1289.         wild-card file specifications of the type '*.*' and '*.BAS'.
  1290.         If more than one file matches the specification, you will be
  1291.         presented with a list of all matching file names in alpha
  1292.         order. Use the arrow keys to highlight the desired file and
  1293.         press Enter. Press the Abort key to cancel.
  1294.  
  1295.         Once a file has been selected, pEDIT will create a buffer for
  1296.         the file and load its contents into memory. The status line
  1297.         will show the new buffer name and the first screen of text,
  1298.         if any, will be displayed. If no matching file exists, pEDIT
  1299.         will display "Creating file" and present an empty screen.
  1300.  
  1301.         pEDIT allows a total of 6 user buffers.
  1302.  
  1303.         5.2. Include File
  1304.  
  1305.         Reads in the specified file from disk and inserts it into the
  1306.         buffer starting at the current cursor location. The result is
  1307.         the same as if the user typed in the text contained in the
  1308.         file.
  1309.  
  1310.         Include File should be used only for relatively small files.
  1311.         The function uses the normal InsertChar routine, not the much
  1312.         faster GetFile which loads text directly into memory.
  1313.  
  1314.         5.3. Write File
  1315.  
  1316.         WriteFile is used to save the contents of the current buffer
  1317.         to disk without terminating the editing session. If no assoc-
  1318.         iated file name has been specified, pEDIT will ask for one.
  1319.  
  1320.         pEDIT verifies that there is sufficient disk space for the
  1321.         file BEFORE starting the save operation. The section on Error
  1322.         Handling has a full description of what to do if you get an
  1323.         error while saving a file.
  1324.  
  1325.         You can change the name of the associated file at any time by
  1326.         using the RenameFile command.
  1327.  
  1328.  
  1329.  
  1330.  
  1331.                                       - 21 -
  1332.  
  1333.  
  1334.  
  1335.  
  1336.         5.4. Rename File
  1337.  
  1338.         This command changes the name of the disk file associated
  1339.         with the current buffer. The new name will be used at the
  1340.         time of the next WriteFile operation.
  1341.  
  1342.         Use RenameFile when you want to save a file under a name
  1343.         other than the one the it was called up under.
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.                                       - 22 -
  1389.  
  1390.  
  1391.  
  1392.  
  1393.                            p E D I T   C O M M A N D S
  1394.  
  1395.                                    6. Buffers
  1396.  
  1397.         These commands affect how text is viewed. You can pick which
  1398.         buffer(s) to view, set the mode and direction for a buffer,
  1399.         and so on.
  1400.  
  1401.         6.1. Show Buffer
  1402.  
  1403.         This command displays detailed information about the current
  1404.         buffer: the buffer name, associated file name, current mode
  1405.         and direction, number of lines and characters of text, etc.
  1406.         The status line also shows the pEDIT version number.
  1407.  
  1408.         6.2. List Buffers
  1409.  
  1410.         This function lists a summary of all defined buffers - the
  1411.         two system buffers (COMMAND and DOS) plus up to 6 user
  1412.         buffers. The following items are displayed: buffer name,
  1413.         number of lines in the buffer, buffer type (System or User),
  1414.         whether or not the buffer has been modified and the name of
  1415.         the file associated with the buffer.
  1416.  
  1417.         6.3. Buffer
  1418.  
  1419.         Use this command to switch between buffers. You will be
  1420.         presented with a BUFFER window containing the names of all
  1421.         buffers except the COMMAND buffer. The cursor will be pos-
  1422.         itioned on the first User buffer. Use the up and down arrow
  1423.         keys to highlight the desired buffer name; press Enter to
  1424.         select that buffer.
  1425.  
  1426.         It is no longer possible to switch to the COMMAND buffer.
  1427.  
  1428.         6.4. Trim Buffer
  1429.  
  1430.         This function 'trims' the current buffer by removing trailing
  1431.         blanks from all lines of text.
  1432.  
  1433.         TrimBuffer is useful in any document where a left margin has
  1434.         been defined. pEDIT automatically indents every line to the
  1435.         specified left margin, which can result in "empty" lines
  1436.         between paragraphs. These empty lines can take up a lot of
  1437.         space in a large document.
  1438.  
  1439.         6.5. Change Mode
  1440.  
  1441.         ChangeMode is used to toggle between Insert and Overstrike
  1442.  
  1443.  
  1444.  
  1445.                                       - 23 -
  1446.  
  1447.  
  1448.  
  1449.  
  1450.         modes. If the mode is Insert when the command is given, it
  1451.         will change to Overstrike and vice versa.
  1452.  
  1453.         6.6. Change Dir
  1454.  
  1455.         Use this command to toggle between the Forward and Reverse
  1456.         directions. Note that only Find, Findnext, Replace and Move-
  1457.         Word use the buffer direction.
  1458.  
  1459.         6.7. Mark
  1460.  
  1461.         This function is used to 'mark' a particular place in a
  1462.         buffer so you can return to it at some later time. There can
  1463.         be only one marker in each buffer. pEDIT tries to stay as
  1464.         close as possible to the original mark as text is inserted
  1465.         and deleted.
  1466.  
  1467.         6.8. Goto Mark
  1468.  
  1469.         This command moves to the position (line and offset) defined
  1470.         by the last Mark command.
  1471.  
  1472.         6.9. Line
  1473.  
  1474.         The Line command is used to display the current line number
  1475.         or move to a particular line in the buffer. Enter "LINE" by
  1476.         itself to display the current line and number of lines; use
  1477.         "LINE nn" to move to line number nn.
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.                                       - 24 -
  1503.  
  1504.  
  1505.  
  1506.  
  1507.                            p E D I T   C O M M A N D S
  1508.  
  1509.                                    7. Windows
  1510.  
  1511.         The window functions control the number of windows on screen
  1512.         and let you select the current window. A window can be moved
  1513.         up/down/left/right to view the desired portion of a buffer.
  1514.  
  1515.         7.1. One Window
  1516.  
  1517.         The OneWindow command 'unsplits' the screen. If there are 2
  1518.         windows on screen, the current window - the one the cursor is
  1519.         in - becomes the only window. The screen will be repainted to
  1520.         show a full 21 lines of text. The line the cursor was on when
  1521.         the command was issued becomes the top line of the window.
  1522.  
  1523.         7.2. Two Windows
  1524.  
  1525.         TwoWindows 'splits' the screen if there is only one window
  1526.         visible. Both windows will initially show the same 10 lines
  1527.         of the current buffer. The cursor will move to the other
  1528.         window anticipating that you want to load in another file.
  1529.  
  1530.         7.3. Other Window
  1531.  
  1532.         If the screen is split, this command will move the cursor to
  1533.         the other window. The cursor will move to the row and column
  1534.         stored the last time the cursor was in the window.
  1535.  
  1536.         7.4. Prev Screen
  1537.  
  1538.         Scrolls the screen up - towards the beginning of the buffer.
  1539.         The number of lines scrolled will equal the number of rows on
  1540.         screen - 21 or 10 depending on the window size. The current
  1541.         direction has no effect on this command.
  1542.  
  1543.         If the screen cannot scroll the full amount, the cursor will
  1544.         move up until it hits the first line of the buffer. This
  1545.         command is normally bound to the <PgUp> key.
  1546.  
  1547.         7.5. Next Screen
  1548.  
  1549.         Scrolls the screen down (toward the end of the buffer) by the
  1550.         number of rows in the current window. The current direction
  1551.         has no effect. The command is normally bound to the <PgDn>
  1552.         key.
  1553.  
  1554.         If the screen cannot scroll the full amount, the cursor will
  1555.         move until it hits the dummy line at the end of the buffer.
  1556.  
  1557.  
  1558.  
  1559.                                       - 25 -
  1560.  
  1561.  
  1562.  
  1563.  
  1564.         7.6. Shift Left
  1565.  
  1566.         The Shift commands provide for horizontal scrolling - the
  1567.         ability to see text beyond column 80. ShiftLeft moves the
  1568.         window to the left (toward the left margin) the specified
  1569.         number of columns.
  1570.  
  1571.         7.7. Shift Right
  1572.  
  1573.         ShiftRight shifts the screen to the right - toward the end of
  1574.         the line - by the number of columns you specify. How far the
  1575.         window can be shifted is limited only by pEDIT's maximum line
  1576.         length of 32767 characters.
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.                                       - 26 -
  1617.  
  1618.  
  1619.  
  1620.  
  1621.                            p E D I T   C O M M A N D S
  1622.  
  1623.                                   8. Key Macros
  1624.  
  1625.         pEDIT's key macro facility lets you automate repetitive
  1626.         tasks. With the following commands you can start a "learn"
  1627.         sequence and pEDIT will "remember" all keystrokes until you
  1628.         give the Remember command. The Execute command is used to
  1629.         play back the keystrokes.
  1630.  
  1631.         With disk macros it is possible to have several pre-defined
  1632.         macros available for use.
  1633.  
  1634.         8.1. Learn
  1635.  
  1636.         The Learn command is used to start recording keystrokes. The
  1637.         recording will continue until the Remember command is given.
  1638.         pEDIT will store all typing keys, function keys and special
  1639.         keys such as control keys.
  1640.  
  1641.         Any keystrokes can be stored in a pEDIT Version 2 key macro.
  1642.         The only restriction is that a macro containing a REPEAT
  1643.         command cannot, for obvious reasons, itself be repeated.
  1644.  
  1645.         8.2. Remember
  1646.  
  1647.         Remember is used to end the keystroke recording started by
  1648.         Learn. pEDIT will ask for a key to bind to; press any of the
  1649.         definable keys on the keyboard. You cannot bind to the Tab,
  1650.         Enter or Backspace keys. Only one keyboard or dynamic macro
  1651.         can be defined at a time.
  1652.  
  1653.         A macro must not be bound to a key that is contained within
  1654.         the macro. If this happens, the macro routine will go into a
  1655.         loop and probably crash the system.
  1656.  
  1657.         8.3. Save Macro
  1658.  
  1659.         SaveMacro is used to save the currently defined keyboard
  1660.         macro to disk. Enter only a file name; pEDIT automatically
  1661.         adds the extension '.PMC'. The editor will write the macro
  1662.         file in the directory pointed to by the PEDIT environment
  1663.         variable, or if none is defined, in the current directory.
  1664.  
  1665.         If a file of the same name already exists, you will be given
  1666.         the chance to overwrite it or cancel.
  1667.  
  1668.         8.4. Execute
  1669.  
  1670.  
  1671.  
  1672.  
  1673.                                       - 27 -
  1674.  
  1675.  
  1676.  
  1677.  
  1678.         Execute is used to execute a macro. When this command is
  1679.         issued, the keystrokes are 'replayed' as if you entered them.
  1680.         There are two forms of this command: one for a dynamic macro,
  1681.         one for a disk macro. See the section titled 'Macro Facility'
  1682.         for more information.
  1683.  
  1684.         Use 'EXECUTE' by itself for the single dynamic macro. To
  1685.         execute a disk macro, use a command of the form 'EXECUTE
  1686.         filename' where 'filename' is a valid DOS file name without
  1687.         an extension. pEDIT automatically adds the file type .PMC to
  1688.         all disk macro file names.
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.                                       - 28 -
  1731.  
  1732.  
  1733.  
  1734.  
  1735.                            p E D I T   C O M M A N D S
  1736.  
  1737.                                 9. Cut and Paste
  1738.  
  1739.         These commands allow for electronic "cut" and "paste". You
  1740.         can delete (cut) a portion of text and store it for later
  1741.         use. The contents of this "paste" buffer can then be copied
  1742.         as many times as desired. Alternately, there is a function to
  1743.         make a copy of selected text without removing it.
  1744.  
  1745.         9.1. Select Text
  1746.  
  1747.         SelectText is a toggle that turns the select state on/off. If
  1748.         the state is off, it will be turned on and vice versa. When
  1749.         active, selected text is highlighted in reverse video as the
  1750.         cursor is moved. Select is automatically turned off after any
  1751.         RemoveText or StoreText command. To cancel the selection,
  1752.         simply issue the command again.
  1753.  
  1754.         9.2. Remove Text
  1755.  
  1756.         This command removes the selected text and stores it in the
  1757.         paste buffer. The paste buffer is rebuilt every time Remove-
  1758.         Text is invoked so only the most recently deleted text is
  1759.         available.
  1760.  
  1761.         9.3. Store Text
  1762.  
  1763.         StoreText is similar to RemoveText except that the text is
  1764.         not removed from the buffer. The paste buffer is rebuilt to
  1765.         contain the selected text. Use this command whenever you want
  1766.         to make a copy of some text without deleting it.
  1767.  
  1768.         9.4. Insert Here
  1769.  
  1770.         Inserts text from the paste buffer into the current buffer
  1771.         starting at the current cursor position. Note that InsertHere
  1772.         can be invoked more than once to make multiple copies of the
  1773.         stored text.
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.                                       - 29 -
  1788.  
  1789.  
  1790.  
  1791.  
  1792.                            p E D I T   C O M M A N D S
  1793.  
  1794.                                 10. Miscellaneous
  1795.  
  1796.         These commands don't fall into any other general category.
  1797.  
  1798.         10.1. Do Command
  1799.  
  1800.         When the "Do" key is pressed the editor will respond with the
  1801.         'Command: ' prompt. At this point you can enter any valid
  1802.         pEDIT command. Commands can be upper- or lower-case or mixed.
  1803.         Note that commands must be entered in full with spaces in
  1804.         between words.
  1805.  
  1806.         The Command line is really a one-line window into the COMMAND
  1807.         buffer. All defined keys can be used on the command line for
  1808.         editing the current line or recalling previous commands. Use
  1809.         MoveUp and MoveDown to scroll up and down through the stored
  1810.         commands.
  1811.  
  1812.         10.2. Recall
  1813.  
  1814.         Recall is used to recall the last command given via Do-
  1815.         Command. The end result is the same as pressing the DoCommand
  1816.         key followed by the up arrow with one important difference;
  1817.         the previous command is copied to the current command line.
  1818.         The command can of course be edited before pressing Enter to
  1819.         begin execution.
  1820.  
  1821.         10.3. Abort
  1822.  
  1823.         pEDIT now has a user-definable abort key. It is no longer
  1824.         'hardwired' to Ctrl-C; this conflicted with WordStar which
  1825.         uses Ctrl-C as a command key.
  1826.  
  1827.         The abort key should be defined in your initialization file.
  1828.  
  1829.         10.4. Refresh Screen
  1830.  
  1831.         This command is used to clear and repaint the screen. Use
  1832.         RefreshScreen if, for any reason, the screen should be over-
  1833.         written or otherwise obliterated. Everything - including
  1834.         reverse video - will be redrawn.
  1835.  
  1836.         10.5. Define Shift
  1837.  
  1838.         This function defines a shift or "lead-in" key for multi-key
  1839.         commands. It signals pEDIT when to expect a second keystroke;
  1840.         therefore a shift key cannot be a command key by itself.
  1841.  
  1842.  
  1843.  
  1844.                                       - 30 -
  1845.  
  1846.  
  1847.  
  1848.  
  1849.         Normally this command would be specified in pEDIT's init file
  1850.         before other key definitions. A maximum of 5 shift keys can
  1851.         be defined.
  1852.  
  1853.         10.6. Define Key
  1854.  
  1855.         Used to dynamically define a key during an editing session.
  1856.         pEDIT will ask for a procedure name and a key press. The
  1857.         procedure name is any valid pEDIT command entered in full (no
  1858.         abbreviations) with or without parameters. An example is "SET
  1859.         SCOPE GLOBAL".
  1860.  
  1861.         It is best to put key bindings in the initialization file so
  1862.         they are automatically defined when the editor is invoked.
  1863.  
  1864.         10.7. Show Key
  1865.  
  1866.         Used to show what procedure is bound to a key. pEDIT will
  1867.         prompt for a key press and display the name of the procedure,
  1868.         if any, bound to that key.
  1869.  
  1870.         10.8. List Keys
  1871.  
  1872.         Lists all defined keys and the procedures bound to them.
  1873.         pEDIT will pause in between screens; press Enter to continue
  1874.         to the next screen.
  1875.  
  1876.         10.9. Spawn
  1877.  
  1878.         This function spawns or shells you to DOS. A second copy of
  1879.         COMMAND.COM is loaded into memory to process commands. You
  1880.         may then enter DOS commands and do anything you can do at the
  1881.         operating system level. Type 'EXIT' to return to the editor
  1882.         exactly as you left it.
  1883.  
  1884.         If you have a floppy-only system, COMMAND.COM must be avail-
  1885.         able or the spawn will fail. Some versions of DOS prior to
  1886.         3.x have a problem with "SHELL" and may not work properly.
  1887.  
  1888.         pEDIT tries to keep 50-70k of memory free for the Spawn and
  1889.         Dos commands; this will not leave sufficient memory for any-
  1890.         thing but DOS resident commands (DIR, TYPE, etc.) and small
  1891.         programs. If more memory is needed, use the eXtended Spawn
  1892.         function (XSpawn).
  1893.  
  1894.         10.10. XSpawn
  1895.  
  1896.         This function serves the same purpose as Spawn but with one
  1897.         important extension. All text memory is swapped out to disk,
  1898.  
  1899.  
  1900.  
  1901.                                       - 31 -
  1902.  
  1903.  
  1904.  
  1905.  
  1906.         leaving much more memory available to DOS. On a machine with
  1907.         640k, about 350k will be freed up - more than enough to
  1908.         compile and run other programs - even another copy of pEDIT.
  1909.  
  1910.         The restrictions noted for Spawn apply here. Also, you must
  1911.         be careful not to delete pEDIT's temporary swap files. See
  1912.         the section titled 'Extended DOS Shell' for more information.
  1913.  
  1914.         10.11. Repeat
  1915.  
  1916.         Repeat lets you repeat any key press up to 32767 times. Only
  1917.         the next single key press - typing, function, Ctrl, Alt - is
  1918.         repeated.
  1919.  
  1920.         The repeat count is shown by 'Repeat: ' on the message line.
  1921.         Use BackSpace to correct the count; set the count to zero if
  1922.         you wish to cancel.
  1923.  
  1924.         You can end a repeat loop by pressing the Abort key.
  1925.  
  1926.         10.12. Set Autosave
  1927.  
  1928.         pEDIT has an 'autosave' function that automatically saves
  1929.         your work to disk. If autosave is on, pEDIT will periodically
  1930.         do a WriteFile if changes have been made. The 'Working . . .'
  1931.         message will appear and the disk access light will come on.
  1932.         You will be told how many lines were written. The usage is
  1933.         'SET AUTOSAVE ON|OFF'.
  1934.  
  1935.         10.13. Set Color
  1936.  
  1937.         SetColor lets you choose foreground and background colors on
  1938.         a color (CGA/EGA/VGA) monitor. For monochrome, the only legal
  1939.         combinations are "SET COLOR blk wht" and "SET COLOR wht blk".
  1940.         Here 'blk' and 'wht' refer to the mono colors whatever they
  1941.         may be - black and white, black and green, etc.
  1942.  
  1943.         The usage is 'SET COLOR fground bground'. See the Appendix
  1944.         for a list of valid color code names.
  1945.  
  1946.         10.14. Set Lines
  1947.  
  1948.         SetLines lets you switch between 25 and 43 line mode on an
  1949.         EGA or VGA monitor. These displays can show more than the
  1950.         normal 25 lines of text. Note that screen writing and scrol-
  1951.         ling are generally much slower in 43-line mode. The SetLines
  1952.         command cannot be given when the screen is split. VGA 50 line
  1953.         mode is not supported. The usage is 'SET LINES 25|43'.
  1954.  
  1955.  
  1956.  
  1957.  
  1958.                                       - 32 -
  1959.  
  1960.  
  1961.  
  1962.  
  1963.         10.15. Set Margins
  1964.  
  1965.         This command lets you set left and right text margins. The
  1966.         default margins are 1 and 80. The left margin must be greater
  1967.         than zero and the right margin has to be greater than the
  1968.         left. The usage is "SET MARGINS left right".
  1969.  
  1970.         10.16. Set PIndent
  1971.  
  1972.         Used to set the paragraph indent, i.e. the number of columns
  1973.         by which to indent the first line of a paragraph. The usage
  1974.         is "SET PINDNT nn" where nn is zero or a positve integer.
  1975.  
  1976.         10.17. Set Scope
  1977.  
  1978.         Specifies the "scope" for all Find and Replace operations. If
  1979.         the scope is local, only the current buffer will be searched.
  1980.         If the scope is global, all user buffers will be searched and
  1981.         'Global' will show on the status line. The format of this
  1982.         command is "SET SCOPE local|global".
  1983.  
  1984.         Things can get out of hand if some buffers are searched in a
  1985.         forward direction while others are searched in reverse. For
  1986.         this reason, the direction for all buffers is temporarily set
  1987.         to Forward during a global search.
  1988.  
  1989.         10.18. Dos
  1990.  
  1991.         The Dos function spawns or "shells" a command to DOS for
  1992.         execution. The output from the command will be placed in the
  1993.         DOS buffer as text. If only one window is on-screen, pEDIT
  1994.         will split the screen and map the DOS buffer to the other
  1995.         window.
  1996.  
  1997.         A second copy of COMMAND.COM must be loaded into memory to
  1998.         handle the request. See Spawn for a discussion of limitations
  1999.         and cautions.
  2000.  
  2001.         10.19. XDos
  2002.  
  2003.         The eXtended DOS function (XDos) uses an intelligent DOS
  2004.         shell to free up additional memory for the execution of DOS
  2005.         commands. See the description of XSpawn and the section
  2006.         titled 'Extended DOS Shell'.
  2007.  
  2008.         A common use of XDos would be to compile a program from
  2009.         within the editor. For example, 'XDOS BC TEST /O ;' would be
  2010.         used to compile a QuickBASIC program. The compiler output
  2011.         will of course be directed into the DOS buffer.
  2012.  
  2013.  
  2014.  
  2015.                                       - 33 -
  2016.  
  2017.  
  2018.  
  2019.  
  2020.         10.20. Help
  2021.  
  2022.         The Help command provides full on-line help for every pEDIT
  2023.         command. The editor looks for a help file named PEDIT.HLP in
  2024.         the directory defined by the PEDIT environment variable, or
  2025.         if none is defined, in the current directory.
  2026.  
  2027.         You will be presented with a HELP window containing an alpha-
  2028.         betical list of all pEDIT commands. Use the arrow keys to
  2029.         highlight the command you want help with and press Enter. The
  2030.         function can be cancelled by pressing Abort.
  2031.  
  2032.         10.21. Keyboard
  2033.  
  2034.         This function displays the contents of the file PEDIT.KEY on
  2035.         the screen in a KEYBOARD window. The editor looks for this
  2036.         file in the directory specified by the PEDIT environment
  2037.         variable, or in the current directory. Normally this command
  2038.         is used to display a diagram of your keyboard and/or a list
  2039.         of the keys you have defined.
  2040.  
  2041.         10.22. Ruler
  2042.  
  2043.         Toggles an 80-column on-screen ruler on and off. The ruler
  2044.         temporarily overwrites the status line.
  2045.  
  2046.         10.23. Quit
  2047.  
  2048.         Use the Quit command to abort an editing session. Abort MEANS
  2049.         abort - any changes you have made will be lost. If any User
  2050.         buffers have been modified, pEDIT gives you the option of not
  2051.         quitting by displaying "Buffer(s) modified - quit (Y/N)? ".
  2052.         Enter Y to abort, N to cancel the abort and resume editing.
  2053.  
  2054.         10.24. Exit
  2055.  
  2056.         The Exit command terminates the editing session and returns
  2057.         you to DOS. The current buffer is automatically written to
  2058.         disk if it has been modified. If any other user buffers have
  2059.         been altered, pEDIT asks you one at a time if you want to
  2060.         write them. Answer Y to save the buffer, N to skip it.
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.                                       - 34 -
  2073.  
  2074.  
  2075.  
  2076.  
  2077.                            M A C R O   F A C I L I T Y
  2078.  
  2079.  
  2080.                                  1. Macro Types
  2081.  
  2082.             pEDIT supports two different kinds of macros. The first
  2083.         is a dynamic macro. The primary use of this type of macro (of
  2084.         which there can be only one) is to automate one-time tasks.
  2085.         If you find you are using the same stored keystrokes over and
  2086.         over, the macro should be given a name and saved to disk.
  2087.  
  2088.             The second type of macro is a disk macro. Start by set-
  2089.         ting up a dynamic macro as above; experiment until you get it
  2090.         working the way you want. Then, issue the Save Macro command
  2091.         and pick a file name. The name must be a standard DOS file-
  2092.         name of up to 8 characters. Do not include a file type; pEDIT
  2093.         automatically adds the extension '.PMC'. If the macro file
  2094.         already exists, you will be given a chance to overwrite the
  2095.         file or abort.
  2096.  
  2097.             Disk macros are used to automate things you do all of the
  2098.         time. Let's say you do medical transcription and constantly
  2099.         have to type in the phrase 'blood pressure'. Easy - define a
  2100.         disk macro 'BP' to automatically enter the text for you.
  2101.  
  2102.             Another use for disk macros is to extend the editor -
  2103.         give it a capability it doesn't have. Two of the sample
  2104.         macros provide something not built-in to pEDIT: the ability
  2105.         to scroll the OTHER window up/down when the screen is split.
  2106.  
  2107.  
  2108.                                2. Macro Execution
  2109.  
  2110.             A dynamic macro is invoked by issuing the command
  2111.         'EXECUTE' without any parameters.
  2112.  
  2113.             Disk macros are executed via 'EXECUTE filename' where
  2114.         filename is the name the macro was saved under. Again, do not
  2115.         specify a file type. pEDIT looks for the macro files in the
  2116.         location specified by your environment variable PEDIT or in
  2117.         the current directory.
  2118.  
  2119.  
  2120.                                 3. Sample Macros
  2121.  
  2122.             pEDIT is supplied with four sample macros which will be
  2123.         installed under these names:
  2124.  
  2125.             LETTER.PMC         Sets the left margin to 10, the right
  2126.  
  2127.  
  2128.  
  2129.                                       - 35 -
  2130.  
  2131.  
  2132.  
  2133.  
  2134.                                margin to 70 and the paragraph indent to
  2135.                                4 for a letter with 1" margins
  2136.  
  2137.             OTHERUP.PMC        Scrolls the other window up
  2138.  
  2139.             OTHERDN.PMC        Scrolls the other window down
  2140.  
  2141.             WORDREV.PMC        Moves one word in the reverse direction;
  2142.                                temporarily changes the buffer direction
  2143.                                to Reverse - so must start Forward
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.                                       - 36 -
  2187.  
  2188.  
  2189.  
  2190.  
  2191.                        E X T E N D E D   D O S   S H E L L
  2192.  
  2193.  
  2194.         Version 1.75 of pEDIT introduced an intelligent DOS shell
  2195.         which provides up to 350k of free memory on a 640k machine
  2196.         when shelled to DOS. This means there is now enough memory to
  2197.         complile from within pEDIT and to run large programs. The
  2198.         eXtended functions XSpawn and XDos use this new method.
  2199.  
  2200.         pEDIT does this by temporarily 'swapping' all text memory out
  2201.         to disk and releasing the memory before calling DOS. When the
  2202.         user types 'EXIT' to return to the parent program, the text
  2203.         storage is reallocated and reloaded from these swap files.
  2204.  
  2205.         pEDIT checks to make sure there is sufficient disk space to
  2206.         hold the swap files. If not, the function will be cancelled.
  2207.         It is very important that you not delete these swap files,
  2208.         which are stored in the current directory with names of
  2209.         PEDMEM?.TMP where ? = 0-4. pEDIT automatically deletes these
  2210.         temporary files after they have been reloaded into memory.
  2211.  
  2212.         Obviously it takes time to do the swapping; use the normal
  2213.         Dos and Spawn functions if the extra memory isn't needed.
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.                                       - 37 -
  2244.  
  2245.  
  2246.  
  2247.  
  2248.                            C O M P I L I N G   F R O M
  2249.                                     p E D I T
  2250.  
  2251.  
  2252.             Programs can be compiled from within pEDIT using the XDos
  2253.         (eXtended DOS) function. There are several ways to handle the
  2254.         compile. In all cases, the output will be placed in the DOS
  2255.         buffer so you can see any errors.
  2256.  
  2257.  
  2258.                               1. Manual Invocation
  2259.  
  2260.             The simplest method is to manually issue the command(s)
  2261.         from within the editor. Unfortunately, a different command
  2262.         line must be typed in for every source buffer so this can't
  2263.         be easily automated. pEDIT now supports simple command sub-
  2264.         stitution to translate
  2265.  
  2266.              XDOS \QBASIC\BC % /S /O ;
  2267.  
  2268.         to, for example,
  2269.  
  2270.              XDOS \QBASIC\BC C:\BASIC\TEST /S /O ;
  2271.  
  2272.         pEDIT will substitute the file name associated with the
  2273.         current buffer less the file type. The file type (extension)
  2274.         is not included because compilers and linkers typically use
  2275.         the same file name but a different file type.
  2276.  
  2277.  
  2278.                                   2. Batch File
  2279.  
  2280.             Another method is to use a batch (BAT) file to perform
  2281.         the compilation. This method requires some finagling because
  2282.         the output from a BAT file cannot be redirected. Recall that
  2283.         pEDIT uses a temporary PEDIT.TMP file to capture the output
  2284.         from a shelled DOS command.
  2285.  
  2286.             Following is a sample batch file to compile and link a
  2287.         QuickBASIC program from pEDIT. Refer to the DOS manuals for
  2288.         more information on batch commands and command substitution
  2289.         using the parameters %1...%9. Note the use of the redirection
  2290.         symbol >> which tells DOS to append the command output to the
  2291.         specified file. This file MUST be named PEDIT.TMP.
  2292.  
  2293.              ECHO OFF
  2294.              IF EXIST %1.BAS GOTO Continue
  2295.              ECHO No source file >>PEDIT.TMP
  2296.              GOTO Exit
  2297.              :Continue
  2298.  
  2299.  
  2300.                                       - 38 -
  2301.  
  2302.  
  2303.  
  2304.  
  2305.               IF EXIST %1.EXE DEL %1.EXE
  2306.               BC %1.BAS /O ; >>PEDIT.TMP
  2307.               LINK /EX /NOE %1.OBJ+QB.LIB,,,BCOM45.LIB ; >>PEDIT.TMP
  2308.               DEL %1.OBJ
  2309.               DEL %1.MAP
  2310.              :Exit
  2311.  
  2312.  
  2313.                                  3. Disk Macros
  2314.  
  2315.             The most elegant way to compile is with pEDIT's new disk
  2316.         macros. These macros can even be set up to automatically step
  2317.         through the compile errors and position to every bad line in
  2318.         the source file! This is quite impressive considering that no
  2319.         macro language is used.
  2320.  
  2321.             Only the general method will be outlined here. Sample
  2322.         macros for compling under QuickBASIC are provided with the
  2323.         optional pEDIT macroPAK which is described in the section
  2324.         titled Add-Ons. Two macros are required here. The first does
  2325.         the actual compilation and positions the DOS buffer to the
  2326.         start of the latest compile statement. The second is used to
  2327.         step through the errors.
  2328.  
  2329.             The most difficult part of the second macro is locating
  2330.         the errors! Compilers use different error indicators. A caret
  2331.         (^) on one line is fairly common to point to the offending
  2332.         part of a statement on the line above. Another problem is
  2333.         that a single source line can generate several errors.
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.                                       - 39 -
  2358.  
  2359.  
  2360.  
  2361.  
  2362.                            E R R O R   H A N D L I N G
  2363.  
  2364.             If an error occurs, pEDIT will bring up an ERROR window
  2365.         and alert you to one of the following problems.
  2366.  
  2367.  
  2368.                         1. Insufficient Internal Storage
  2369.  
  2370.             When pEDIT is first started it checks to see how much
  2371.         free memory is available. This determines the maximum number
  2372.         of lines and characters of text it can handle. pEDIT informs
  2373.         you whenever 99% of either of these values is reached and
  2374.         advises you to "Save your work and exit". You can continue to
  2375.         work; however, you will get the warning *every* time text is
  2376.         added. If you ignore the warnings and exceed the allocated
  2377.         space, the program will abort.
  2378.  
  2379.             There is no recovery from this other than to exit (be
  2380.         sure to save your files!) and start over. pEDIT presently
  2381.         cannot free up memory once it has been allocated.
  2382.  
  2383.  
  2384.                            2. Insufficient Disk Space
  2385.  
  2386.             pEDIT checks for sufficient disk space BEFORE starting a
  2387.         file save operation. If this does happen, you will be advised
  2388.         to "Increase available space on current drive or change file
  2389.         specification via RenameFile".
  2390.  
  2391.             The text is still in memory and has not been lost; how-
  2392.         ever, it has not yet been saved to disk. If possible, Spawn
  2393.         out to DOS and delete some files to free up space. Or, switch
  2394.         to a different diskette that has more room. Or, use "RENAME
  2395.         FILE" to change to another drive; if the current file is
  2396.         A:MYFILE.TXT, save the file as B:MYFILE.TXT.
  2397.  
  2398.  
  2399.                             3. No Initialization File
  2400.  
  2401.             pEDIT requires a file named PEDIT.INI for proper oper-
  2402.         ation. If this file does not exist, it means that pEDIT has
  2403.         not been properly installed. Refer to the section 'Installing
  2404.         pEDIT' for details on how to run the INSTALL procedure.
  2405.  
  2406.             If no init file can be found, pEDIT will invoke a minimal
  2407.         default configuration so you can communicate with the editor.
  2408.         The colors are set to white on blue, and the labelled keys
  2409.         such as the cursor keys, Ins, Del, PgUp, PgDn are bound to
  2410.         their exspected functions. Finally, the Esc key is defined as
  2411.         DoCommand.
  2412.  
  2413.  
  2414.                                       - 40 -
  2415.  
  2416.  
  2417.  
  2418.  
  2419.                             M I S C E L L A N E O U S
  2420.                                L E G A L I T I E S
  2421.  
  2422.  
  2423.                                1. Copyright Notice
  2424.  
  2425.             This document, other accompanying written and disk-based
  2426.         specifications, and all referenced and related program files
  2427.         are copyrighted by T. G. Muench.
  2428.  
  2429.             IBM and PC-DOS are registered trademarks of International
  2430.         Business Machines Corporation. MS-DOS and QuickBASIC are
  2431.         trademarks of Microsoft Corporation. WordStar is a registered
  2432.         trademark of MicroPro International Corporation.
  2433.  
  2434.  
  2435.                            2. Disclaimer and Warranty
  2436.  
  2437.         pEDIT IS SUPPLIED AS IS. THE AUTHOR DISCLAIMS ALL WARRANTIES,
  2438.         EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE
  2439.         WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR ANY PURPOSE.
  2440.         THE AUTHOR ASSUMES NO LIABILITY FOR DAMAGES, DIRECT OR CON-
  2441.         SEQUENTIAL, WHICH MAY RESULT FROM THE USE OF pEDIT.
  2442.  
  2443.  
  2444.                                  3. Registration
  2445.  
  2446.             pEDIT is a "shareware program" and is provided at no
  2447.         charge to the user for evaluation. Feel free to share it with
  2448.         your friends, but please do not give it away altered or as
  2449.         part of another system. The essence of "user-supported"
  2450.         software is to provide personal computer users with quality
  2451.         software without high prices, and yet to provide incentive
  2452.         for programmers to continue to develop new products. If you
  2453.         find this program useful and find that you are using pEDIT
  2454.         and continue to use pEDIT after a reasonable trial period,
  2455.         you must make a registration payment of $25 to T. G. Muench.
  2456.  
  2457.             Commercial users of pEDIT must register and pay for their
  2458.         copies of pEDIT within 30 days of first use or their license
  2459.         is withdrawn. Site-License arrangements may be made by
  2460.         contacting T. G. Muench.
  2461.  
  2462.             Anyone distributing pEDIT for any kind of remuneration
  2463.         must first contact T. G. Muench at the address below for
  2464.         authorization. This authorization will be automatically
  2465.         granted to distributors recognized by the (ASP) as adhering
  2466.         to its guidelines for shareware distributors, and such
  2467.         distributors may begin offering pEDIT immediately. However,
  2468.         T. G. Muench must still be advised so that the distributor
  2469.  
  2470.  
  2471.                                       - 41 -
  2472.  
  2473.  
  2474.  
  2475.  
  2476.         can be kept up-to-date with the latest version of pEDIT.
  2477.  
  2478.             You are encouraged to pass a copy of pEDIT along to your
  2479.         friends for evaluation. Please encourage them to register
  2480.         their copy if they find that they can use it. All registered
  2481.         users will receive, on 5.25" DSDD disk, the latest version of
  2482.         pEDIT (without the opening/ending shareware 'beg' screen),
  2483.         a printed manual, telephone support, FREE utilities and one
  2484.         FREE upgrade.
  2485.  
  2486.             Your comments and suggestions are welcomed by writing to
  2487.         the author at the address given below. Written communications
  2488.         ONLY will be accepted from non-registered users. Be sure and
  2489.         reference the version number of your copy of pEDIT (use the
  2490.         SHOW BUFFER command).
  2491.  
  2492.             To register, complete the registration form included in
  2493.         the disk file REGISTER.DOC. Then, print it and mail it with
  2494.         $25 to:
  2495.  
  2496.                                   T. G. Muench
  2497.                                  P.O. Box 11536
  2498.                              Prescott, AZ 86304-1536
  2499.  
  2500.  
  2501.                     4. Association Of Shareware Professionals
  2502.  
  2503.             This program is produced by a member of the Association
  2504.         of Shareware Professionals (ASP). ASP wants to make sure that
  2505.         the shareware principle works for you. If you are unable to
  2506.         resolve a shareware-related problem with an ASP member by
  2507.         contacting the member directly, ASP may be able to help. The
  2508.         ASP Ombudsman can help you resolve a dispute or problem with
  2509.         an ASP member, but does not provide technical support for
  2510.         members' products. Please write to the ASP Ombudsman at 545
  2511.         Grover Road, Muskegon MI 49442 or send a CompuServe message
  2512.         via CompuServe Mail to ASP Ombudsman [70007,3536].
  2513.  
  2514.  
  2515.                                   5. The Author
  2516.  
  2517.             Like many people who ended up working on computers, T. G.
  2518.         (Terry) Muench started elsewhere. He has a Master's degree in
  2519.         Chemistry and worked for Dow Chemical Co. after college. He
  2520.         got out of this dangerous profession after 4 years and moved
  2521.         to Prescott, Arizona where he took a job as a computer oper-
  2522.         ator trainee at a junior college.
  2523.  
  2524.             After 4 years he was forced to leave Prescott to find a
  2525.         living wage. He worked as a Programmer/Analyst on (mostly)
  2526.  
  2527.  
  2528.                                       - 42 -
  2529.  
  2530.  
  2531.  
  2532.  
  2533.         DEC hardware and later became VAX Systems Manager for a large
  2534.         Southwestern bank. He again 'gave it all up' after 10 years
  2535.         of aggravation and stress and has returned to Prescott.
  2536.  
  2537.             The author has been involved with micros since CP/M days.
  2538.         He has owned a Kaypro, a PC-XT clone and now a PC-AT clone.
  2539.         He would like to have a 386(SX) but can't afford one unless
  2540.         you people start registering!
  2541.  
  2542.             T. G. is married and has no children. His hobbies are
  2543.         moving around and building houses which he later sells for a
  2544.         loss.
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.                                       - 43 -
  2586.  
  2587.  
  2588.  
  2589.  
  2590.                           A D D - O N   P R O D U C T S
  2591.  
  2592.  
  2593.             Macro utilities and several sample macros come with the
  2594.         new pEDIT macroPAK. This $10 add-on has programs to convert
  2595.         macro files between pEDIT's internal binary format and
  2596.         editable text files containing key names and commands. This
  2597.         gives the pEDIT user 'almost' a macro language.
  2598.  
  2599.             Please be aware that the macroPAK is *NOT* required to
  2600.         use pEDIT's disk macros. You can use the macro recording
  2601.         (Learn and Remember) and saving (Save Macro) commands
  2602.         outlined in this document. The macroPAK is designed to let
  2603.         you edit existing macros and create new ones without using
  2604.         the built-in commands.
  2605.  
  2606.             The pEDIT macroPAK is composed of the following utility
  2607.         programs:
  2608.  
  2609.             PMC2ASC - converts from binary to Ascii; used to trans-
  2610.                       late a PMC file into Ascii so macros can be
  2611.                       edited
  2612.  
  2613.             ASC2PMC - performs the opposite function; translates
  2614.                       an ASC file back to a binary PMC file
  2615.  
  2616.             These utilities work by loading in your customized init
  2617.         file (PEDIT.INI) and translating keystrokes to pEDIT
  2618.         commands. As an example, suppose you wanted to define a macro
  2619.         called PAGE to insert a form feed at the current cursor
  2620.         position. You would create an Ascii text file PAGE.ASC
  2621.         containing:
  2622.  
  2623.             {Quote_Char}<Ctrl-L>
  2624.  
  2625.             Running this file through ASC2PMC would convert the
  2626.         literal {Quote_Char} to the binary code for the key you have
  2627.         defined for this command. The result would be a binary pEDIT
  2628.         macro PAGE.PMC which can be used by the editor. Naturally,
  2629.         both procedure names and key names are the same ones you use
  2630.         in your pEDIT.INI file. Procedure names are enclosed in
  2631.         squiggly brackets {} while key names use angle brackets <>.
  2632.  
  2633.             These programs make it easy to modify existing macros
  2634.         without having to start from scratch.
  2635.  
  2636.             Several sample disk macros are included with the pEDIT
  2637.         macroPAK. Among these are QBCOMP1 and QBCOMP2 which compile a
  2638.         QuickBASIC program and step through the errors.
  2639.  
  2640.  
  2641.  
  2642.                                       - 44 -
  2643.  
  2644.  
  2645.  
  2646.  
  2647.                                A P P E N D I C E S
  2648.  
  2649.                                  A. Key Bindings
  2650.  
  2651.                                 1. Labelled Keys
  2652.  
  2653.             Many of the labeled keys on the PC keyboard are bound to
  2654.         functions common to all configurations. The function bound to
  2655.         these keys corresponds to the key name. Keys marked with (*)
  2656.         cannot be redefined.
  2657.  
  2658.  
  2659.          BackSpace           Erase Prev(*)
  2660.          Tab                 Insert Char(*)
  2661.          Enter               Insert Char(*)
  2662.  
  2663.          Home                Move Home
  2664.          End                 Move End
  2665.          Pgup                Prev Screen
  2666.          Pgdn                Next Screen
  2667.          Up                  Move Up
  2668.          Down                Move Down
  2669.          Left                Move Left
  2670.          Right               Move Right
  2671.  
  2672.          Ctrl-Enter          Auto Indent
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.                                       - 45 -
  2700.  
  2701.  
  2702.  
  2703.  
  2704.                                A P P E N D I C E S
  2705.  
  2706.                                  A. Key Bindings
  2707.  
  2708.                                    2. WordStar
  2709.  
  2710.  
  2711.          Esc                 Do Command
  2712.  
  2713.          F01                 Help
  2714.          F02
  2715.          F03                 Findnext
  2716.          F04
  2717.          F05                 Change Mode
  2718.          F06                 Change Dir
  2719.          F07                 Learn
  2720.          F08                 Repeat
  2721.          F09
  2722.          F10
  2723.          F11                 Store Text
  2724.          F12
  2725.  
  2726.          Ins                 Change Mode
  2727.          Del                 Erase Char
  2728.          Ctrl-Home           Move Top
  2729.          Ctrl-End            Move End
  2730.          Ctrl-Left           Shift Left 40
  2731.          Ctrl-Right          Shift Right 40
  2732.          Ctrl-Pgup           Execute Otherup
  2733.          Ctrl-Pgdn           Execute Otherdn
  2734.  
  2735.          Alt-1               One Window
  2736.          Alt-2               Two Windows
  2737.          Alt-A               Abort
  2738.          Alt-B               Buffer
  2739.          Alt-C               Capital Word
  2740.          Alt-D               Dos
  2741.          Alt-H               Keyboard
  2742.          Alt-K               Define Key
  2743.          Alt-L               Lower Word
  2744.          Alt-O               Other Window
  2745.          Alt-P               Set PIndent
  2746.          Alt-Q               Quit
  2747.          Alt-R               Remember
  2748.          Alt-S               Set Scope
  2749.          Alt-T               Trans Char
  2750.          Alt-U               Upper Word
  2751.          Alt-X               Execute
  2752.  
  2753.  
  2754.  
  2755.  
  2756.                                       - 46 -
  2757.  
  2758.  
  2759.  
  2760.  
  2761.          Ctrl-A              Execute Wordrev
  2762.          Ctrl-B              Fill Paragraph
  2763.          Ctrl-C              Next Screen
  2764.          Ctrl-D              Move Right
  2765.          Ctrl-E              Move Up
  2766.          Ctrl-F              Move Word
  2767.          Ctrl-G              Erase Char
  2768.          Ctrl-L              Findnext
  2769.          Ctrl-N              Open Line
  2770.          Ctrl-P              Quote Char
  2771.          Ctrl-R              Prev Screen
  2772.          Ctrl-S              Move Left
  2773.          Ctrl-T              Erase Word
  2774.          Ctrl-U              Restore Text
  2775.          Ctrl-V              Change Mode
  2776.          Ctrl-X              Move Down
  2777.          Ctrl-Y              Erase Line
  2778.  
  2779.          Ctrl-K+B            Select Text
  2780.          Ctrl-K+C            Insert Here
  2781.          Ctrl-K+D            Get File
  2782.          Ctrl-K+F            Rename File
  2783.          Ctrl-K+Q            Quit
  2784.          Ctrl-K+R            Include File
  2785.          Ctrl-K+S            Write File
  2786.          Ctrl-K+U            Select Text
  2787.          Ctrl-K+Y            Remove Text
  2788.          Ctrl-K+X            Exit
  2789.  
  2790.          Ctrl-Q+A            Replace
  2791.          Ctrl-Q+C            Move Bottom
  2792.          Ctrl-Q+D            Move End
  2793.          Ctrl-Q+F            Find
  2794.          Ctrl-Q+I            Line
  2795.          Ctrl-Q+P            Goto Mark
  2796.          Ctrl-Q+R            Move Top
  2797.          Ctrl-Q+S            Move Home
  2798.          Ctrl-Q+Y            Erase Line
  2799.  
  2800.          Ctrl-O+C            Center Line
  2801.          Ctrl-O+L            Set Margins
  2802.          Ctrl-O+R            Set Margins
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.                                       - 47 -
  2814.  
  2815.  
  2816.  
  2817.  
  2818.                                A P P E N D I C E S
  2819.  
  2820.                                  A. Key Bindings
  2821.  
  2822.                                     3. Emacs
  2823.  
  2824.  
  2825.          Esc+Esc             Do Command
  2826.  
  2827.          F01                 Help
  2828.          F02
  2829.          F03                 Findnext
  2830.          F04
  2831.          F05                 Change Mode
  2832.          F06                 Change Dir
  2833.          F07
  2834.          F08
  2835.          F09                 Restore
  2836.          F10
  2837.          F11                 Store Text
  2838.          F12
  2839.  
  2840.          Ins                 Change Mode
  2841.          Del                 Erase Char
  2842.          Ctrl-Home           Move Top
  2843.          Ctrl-End            Move End
  2844.          Ctrl-Left           Shift Left 40
  2845.          Ctrl-Right          Shift Right 40
  2846.          Ctrl-Pgup           Execute Otherup
  2847.          Ctrl-Pgdn           Execute Otherdn
  2848.  
  2849.          Alt-F               Fill Paragraph
  2850.          Alt-H               Keyboard
  2851.          Alt-K               Define Key
  2852.          Alt-M               Set Margins
  2853.          Alt-P               Set PIndent
  2854.          Alt-Q               Quit
  2855.          Alt-R               Replace
  2856.          Alt-S               Set Scope
  2857.  
  2858.          Ctrl-A              Move Home
  2859.          Ctrl-B              Move Left (backwards)
  2860.          Ctrl-C              Spawn
  2861.          Ctrl-D              Erase Char
  2862.          Ctrl-E              Move End
  2863.          Ctrl-F              Move Right (forward)
  2864.          Ctrl-G              Abort
  2865.          Ctrl-H             =BackSpace
  2866.          Ctrl-I             =Tab
  2867.          Ctrl-J             =Ctrl-Enter
  2868.  
  2869.  
  2870.                                       - 48 -
  2871.  
  2872.  
  2873.  
  2874.  
  2875.          Ctrl-K              Erase Line (kill line)
  2876.          Ctrl-L              Refresh Screen
  2877.          Ctrl-M             =Enter
  2878.          Ctrl-N              Move Down (next line)
  2879.          Ctrl-P              Move Up (previous line)
  2880.          Ctrl-S              Find (search)
  2881.          Ctrl-T              Trans Char
  2882.          Ctrl-U              Repeat (universal)
  2883.          Ctrl-V              Next Screen
  2884.          Ctrl-W              Remove Text (wipe)
  2885.          Ctrl-Y              Insert Here (yank)
  2886.          Ctrl-Z              Exit
  2887.  
  2888.          Esc+.               Select Text
  2889.          Esc+<               Move Top
  2890.          Esc+>               Move Bottom
  2891.          Esc+B               Execute Wordrev (word back)
  2892.          Esc+C               Capital Word
  2893.          Esc+D               Erase Word
  2894.          Esc+F               Move Word (word forward)
  2895.          Esc+L               Lowercase Word
  2896.          Esc+U               Uppercase Word
  2897.          Esc+V               Prev Screen
  2898.  
  2899.          Ctrl-X+(            Learn (start macro)
  2900.          Ctrl-X+)            Remember (end macro)
  2901.          Ctrl-X+1            One window
  2902.          Ctrl-X+2            Two windows
  2903.          Ctrl-X+B            Buffer
  2904.          Ctrl-X+E            Execute (macro)
  2905.          Ctrl-X+N            Other window (next window)
  2906.          Ctrl-X+P            Other window (previous window)
  2907.          Ctrl-X+Ctrl-B       List buffers
  2908.          Ctrl-X+Ctrl-C       Quit
  2909.          Ctrl-X+Ctrl-R       Include file (read file)
  2910.          Ctrl-X+Ctrl-S       Write file (save file)
  2911.          Ctrl-X+Ctrl-V       Get file (visit file)
  2912.          Ctrl-X+Ctrl-W       Rename file (write file)
  2913.  
  2914.  
  2915.  
  2916.  
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.                                       - 49 -
  2928.  
  2929.  
  2930.  
  2931.  
  2932.                                A P P E N D I C E S
  2933.  
  2934.                                  A. Key Bindings
  2935.  
  2936.                             4. Standard and Alternate
  2937.  
  2938.  
  2939.          Key Name            STANDARD Config.       ALTERNATE Config.
  2940.          --------            ----------------       -----------------
  2941.  
  2942.          Esc                 Do Command             Do Command
  2943.  
  2944.          F01                 Help                   Find
  2945.          F02                 Buffer                 Move Word
  2946.          F03                 Findnext               Findnext
  2947.          F04                 Other Window           Erase Word
  2948.          F05                 Restore Text           Change Mode
  2949.          F06                 Change Dir             Change Dir
  2950.          F07                 Learn                  Learn
  2951.          F08                 Repeat                 Repeat
  2952.          F09                 Quit                   Restore Text
  2953.          F10                 Write File             Write File
  2954.          F11                 Store Text             Store Text
  2955.          F12
  2956.  
  2957.          Ins                 Change Mode            Insert Here
  2958.          Del                 Erase Char             Remove Text
  2959.          Ctrl-Home           Move Top               Move Top
  2960.          Ctrl-End            Move End               Move End
  2961.          Ctrl-Left           Execute Wordfwd        Shift Left 20
  2962.          Ctrl-Right          Execute Wordrev        Shift Right 20
  2963.          Ctrl-Pgup
  2964.          Ctrl-Pgdn
  2965.  
  2966.          Alt-A
  2967.          Alt-B                                      Buffer
  2968.          Alt-C               Capital Word           Capital Word
  2969.          Alt-D               Remove Text
  2970.          Alt-E
  2971.          Alt-F               Fill Paragraph         Fill Paragraph
  2972.          Alt-G               Get File               Get File
  2973.          Alt-H               Keyboard               Help
  2974.          Alt-I               Include File           Include File
  2975.          Alt-J
  2976.          Alt-K               Define Key             Define Key
  2977.          Alt-L               Lower Word             Lower Word
  2978.          Alt-M               Set Margins            Set Margins
  2979.          Alt-N
  2980.          Alt-O                                      Other Window
  2981.          Alt-P               Insert Here
  2982.  
  2983.  
  2984.                                       - 50 -
  2985.  
  2986.  
  2987.  
  2988.  
  2989.          Alt-Q               Quit                   Quit
  2990.          Alt-R               Replace                Replace
  2991.          Alt-S               Select Text            Select Text
  2992.          Alt-T               Trans Char             Trans Char
  2993.          Alt-U               Upper Word             Upper Word
  2994.          Alt-V
  2995.          Alt-W               Move Word              Move Word
  2996.          Alt-X
  2997.          Alt-Y
  2998.          Alt-Z
  2999.          Alt-1               One Window             One Window
  3000.          Alt-2               Two Windows            Two Windows
  3001.  
  3002.          Ctrl-A
  3003.          Ctrl-B              Recall                 Recall
  3004.          Ctrl-C              Abort                  Abort
  3005.          Ctrl-D              Erase Word             Erase Char
  3006.          Ctrl-E
  3007.          Ctrl-F              Find
  3008.          Ctrl-G              Set Scope Global       Set Scope Global
  3009.          Ctrl-H             =BackSpace             =BackSpace
  3010.          Ctrl-I             =Tab                   =Tab
  3011.          Ctrl-J             =Ctrl-Enter            =Ctrl-Enter
  3012.          Ctrl-K              Erase Line             Erase Line
  3013.          Ctrl-L              Set Scope Local        Set Scope Local
  3014.          Ctrl-M             =Enter                 =Enter
  3015.          Ctrl-N
  3016.          Ctrl-O              Open Line              Open Line
  3017.          Ctrl-P              Set PIndent            Set Pindent
  3018.          Ctrl-Q
  3019.          Ctrl-R              Remember               Remember
  3020.          Ctrl-S
  3021.          Ctrl-T
  3022.          Ctrl-U
  3023.          Ctrl-V              Quote Char             Quote Char
  3024.          Ctrl-W              Refresh Screen         Refresh Screen
  3025.          Ctrl-X
  3026.          Ctrl-Y
  3027.          Ctrl-Z              Exit                   Exit
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.                                       - 51 -
  3042.  
  3043.  
  3044.  
  3045.  
  3046.                                A P P E N D I C E S
  3047.  
  3048.                              B. The DOS Environment
  3049.  
  3050.             Most PC users are familiar with the DOS PATH command. A
  3051.         statement of the form
  3052.  
  3053.             PATH C:\;C:\DOS\;C:\PEDIT
  3054.  
  3055.         in your AUTOEXEC file tells DOS where to look for programs
  3056.         and batch files. Unfortunately, the DOS environment is a
  3057.         mystery to most.
  3058.  
  3059.             Environment variables are defined using the SET command.
  3060.         SET by itself displays a list of all defined variables while
  3061.         a command of the form 'SET NAME=VALUE' defines a variable.
  3062.         Programs can read these defined environment variables and get
  3063.         access to the equivalence value. A common use is to tell a
  3064.         program where needed files are located. This is what pEDIT
  3065.         needs to know. Adding the line:
  3066.  
  3067.              SET PEDIT=C:\PEDIT
  3068.  
  3069.         to your AUTOEXEC.BAT file lets pEDIT find its init, help and
  3070.         key files no matter what device/directory you are in. Note
  3071.         that only a device and directory are specified. This is dif-
  3072.         ferent from previous versions of pEDIT where each file had a
  3073.         separate variable. Obviously, this method saves environment
  3074.         space.
  3075.  
  3076.             DOS allocates only a relatively small amount of memory
  3077.         for the environment and it is possible to exceed this. The
  3078.         error is 'Out of environment space' while booting. If this
  3079.         happens and you have DOS 3.1 or higher, add the following
  3080.         line to your CONFIG.SYS file:
  3081.  
  3082.              SHELL=C:\DOS\COMMAND.COM C:\DOS /E:256 /P
  3083.  
  3084.         and reboot. Substitute your device and path in place of
  3085.         C:\DOS. Here, the /E:256 tells DOS to reserve 256 bytes of
  3086.         environment space.
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.                                       - 52 -
  3099.  
  3100.  
  3101.  
  3102.  
  3103.                                A P P E N D I C E S
  3104.  
  3105.                              C. Initialization File
  3106.  
  3107.             pEDIT requires an initialization file named PEDIT.INI.
  3108.         This file must be available to pEDIT either through trans-
  3109.         lation of the DOS environment variable PEDIT or be located in
  3110.         the current directory.
  3111.  
  3112.             Four sample initialization files are included with the
  3113.         editor:
  3114.  
  3115.             WordStar     the first PC word processor; many people
  3116.                          know the WordStar keys plus lots of soft-
  3117.                          ware uses it, too
  3118.  
  3119.             Emacs        the famous UNIX programmer's editor; uses
  3120.                          mnemonics, i.e. Ctrl-F = forward, Ctrl-B
  3121.                          = backwards
  3122.  
  3123.             Standard     Attempts to conform to the so-called PC
  3124.                          standard where F01 = Help, etc.
  3125.  
  3126.             Alternate    The original pEDIT configuration.
  3127.  
  3128.             A pEDIT initialization file is a simple Ascii text file
  3129.         containing any of the following commands: DEFINE_SHIFT(),
  3130.         DEFINE_KEY() and SET(). Note the underscore between words and
  3131.         the parentheses. The commands can be uppercase, lowercase or
  3132.         mixed. The editor ignores blank lines and treats anything
  3133.         after an exclamation point as a comment.
  3134.  
  3135.             Unlike other editors, pEDIT uses English key names. You
  3136.         don't have to worry about remembering what '@' and '#' stand
  3137.         for. pEDIT uses the prefixes shown on your keyboard: Alt and
  3138.         Ctrl.
  3139.  
  3140.             DEFINE_SHIFT is used to define a shift or 'lead-in' key
  3141.         and tells pEDIT that the key will be the first key of a multi-
  3142.         key command. DEFINE_SHIFT(Ctrl-Q) sets up Control-Q as one of
  3143.         WordStar's lead-in keys. The shift keys should be defined at
  3144.         the top of the init file before any key definitions that use
  3145.         that shift key.
  3146.  
  3147.             DEFINE_KEY defines a key to pEDIT when the editor is
  3148.         invoked. Obviously, no one would want to have to define every
  3149.         key every time they wanted to edit something. The statement
  3150.         DEFINE_KEY (Alt-G, Get_File) binds the key named Alt-G to the
  3151.         procedure GetFile. A plus sign (+) between two key names
  3152.         indicates a two key command. DEFINE_KEY(Ctrl-Q+F) defines
  3153.  
  3154.  
  3155.                                       - 53 -
  3156.  
  3157.  
  3158.  
  3159.  
  3160.         WordStar's find command: a Control-Q followed by an F.
  3161.  
  3162.             SET is used to define the editing environment. If you
  3163.         wanted pEDIT to always come up in color using blue on a white
  3164.         back-ground, you would include SET (COLOR, BLU, WHT) in the
  3165.         init file. This would be the same as entering the command
  3166.         "SET COLOR Blu Wht" from within pEDIT.
  3167.  
  3168.             Of course, you don't have to use the initialization files
  3169.         supplied with the editor. You can set up any keyboard mapping
  3170.         you want.
  3171.  
  3172.  
  3173.                                   D. Help File
  3174.  
  3175.             The Help file PEDIT.HLP is required if you want to use
  3176.         the Help function. This file can also be modified by the
  3177.         user. However, there is one important restriction: the file
  3178.         must contain fixed 78-byte records. The editor uses random
  3179.         file access to read the help file so it must be made up of
  3180.         fixed-length records.
  3181.  
  3182.             You can customize the help file as long as you keep each
  3183.         record's length at exactly 78 bytes by 'padding' with spaces.
  3184.         You will want to limit each command's text to 20 lines (one
  3185.         screenful) of text. If you look at the file you will that see
  3186.         each command starts with two carets plus the command name in
  3187.         caps - for example "^^MOVE UP".
  3188.  
  3189.  
  3190.                               E. Keyboard Help File
  3191.  
  3192.             The editor uses the optional file PEDIT.KEY for the Key-
  3193.         board command. When this command is invoked, pEDIT displays
  3194.         the contents of PEDIT.KEY in a KEYBOARD window. As always,
  3195.         this file must be available through the DOS environment or be
  3196.         in the current directory.
  3197.  
  3198.             pEDIT comes with four sample keyboard files corresponding
  3199.         to the 4 initialization files listed above.
  3200.  
  3201.  
  3202.  
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.                                       - 54 -
  3213.  
  3214.  
  3215.  
  3216.  
  3217.                                A P P E N D I C E S
  3218.  
  3219.                                  F. Color Codes
  3220.  
  3221.  
  3222.          BLK                   Black
  3223.          BLU                   Blue
  3224.          GRN                   Green
  3225.          CYN                   Cyan
  3226.          RED                   Red
  3227.          MAG                   Magenta
  3228.          BRN                   Brown
  3229.          WHT                   White
  3230.          GRY                   Grey
  3231.          LBL                   Light Blue
  3232.          LGR                   Light Green
  3233.          LCY                   Light Cyan
  3234.          LRD                   Light Red (Pink)
  3235.          LMG                   Light Magenta
  3236.          YEL                   Yellow
  3237.          BWH                   Bright White
  3238.  
  3239.  
  3240.          The light colors are sometimes called 'bright'
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.  
  3249.  
  3250.  
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256.  
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.  
  3266.  
  3267.  
  3268.  
  3269.                                       - 55 -
  3270.  
  3271.